package com.retirement.common;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * <p>
 *数据类型枚举类
 * </p>
 *
 * @author lijy
 * @since 2023-12-25
 */
@AllArgsConstructor
@Getter
public enum DataTypeEnum {


    /** 活动 */
    OLD_ACTIVITY("old_activity","活动表"),
    /** 子女 */
    OLD_CHILDREN("old_children","子女表");


    @ApiModelProperty(value = "关联表")
    private String table;

    @ApiModelProperty(value = "描述")
    private String desc;


    public static DataTypeEnum getByTable(String table) {
        for (DataTypeEnum dataTypeEnum : values()) {
            if (dataTypeEnum.table.equals(table)) {
                return dataTypeEnum;
            }
        }
        return null;
    }

}
